<div layout="column" flex class="recipe-widget">
  <div class="stack-label-info">Bring your own stack.</div>
  <ng-form name="workspaceInformationForm">
    <md-radio-group ng-model="workspaceRecipeCtrl.selectSourceOption" ng-change="workspaceRecipeCtrl.setDefaultData()">
      <div layout="row" flex="100">
        <div layout="column" flex="50">
          <md-radio-button value="upload-custom-stack">Import custom stack</md-radio-button>
          <div layout="row" layout-wrap>
            <div ng-if="workspaceRecipeCtrl.selectSourceOption === 'upload-custom-stack'" class="recipe-url">
              <che-label-container che-label-name="Recipe URL">
                <che-input che-form="workspaceInformationForm"
                            che-name="url"
                            che-place-holder="URL of the Recipe"
                            che-pattern="(^((ftp|http|https)://[\w@.\-\_]+(:\d{1,5})?(/[\w#!:.?+=&%@!\_\-/]+)*){1}$)"
                            ng-model="workspaceRecipeCtrl.recipeUrl"
                            ng-maxlength="255">
                  <div ng-message="maxlength">The name has to be less than 255 characters long.</div>
                  <div ng-message="pattern">URL is not valid.</div>
                </che-input>
              </che-label-container>
            </div>
          </div>
        </div>
        <div layout="column" flex="50">
          <md-radio-button value="edit-your-stack">
            Write your own stack
          </md-radio-button>
          <div layout="row" layout-wrap>
            <div ng-if="workspaceRecipeCtrl.selectSourceOption === 'edit-your-stack'" class="recipe-editor">
              <ui-codemirror ui-codemirror="workspaceRecipeCtrl.editorOptions"
                             ng-model="workspaceRecipeCtrl.recipeScript"></ui-codemirror>
              <div class="recipe-docs-link">
                <a href="https://eclipse-che.readme.io/docs/custom-machine#che-stacks">Custom stack documentation</a>
              </div>
            </div>
          </div>
        </div>
      </div>
    </md-radio-group>
  </ng-form>
</div>
